<template>
  <div class="home-skeleton">
    <div class="item" v-for="i in 4" :key="i" :style="{backgroundColor: bg}">
      <xtxSkeleton width="306px" height="306px" bg="#e4e4e4" :animated="true"/>
      <xtxSkeleton width="160px" height="24px" bg="#e4e4e4" :animated="true"/>
      <xtxSkeleton width="120px" height="24px" bg="#e4e4e4" :animated="true"/>
    </div>
  </div>
</template>

<script>
import xtxSkeleton from '@/components/library/xtx-skeleton.vue'
export default {
  name: 'HomeSkeleton',
  props: {
    bg: {
      type: String,
      default: '#fff'
    }
  },
  components: {
    xtxSkeleton
  }
}
</script>

<style lang="less" scoped>
.home-skeleton {
  width: 1240px;
  height: 406px;
  display: flex;
  justify-content: space-between;
  .item {
    width: 306px;
    .xtx-skeleton {
      display: block;
      margin: 16px auto 0;
    }
  }
}
</style>
